#pragma once

#include <CString>
//using namespace std;

#include "IDrawable.h"
#include "Pos.h"

/* test include */
#include <vector>
using namespace std;

class Node : public IDrawable {
// itself data
protected:
	CString data;
	CRect bound;
	CRect textBound;
	Pos pos;

// others obj data
protected:
	vector<Node*> childList;
	Node* parentNode;
	// Edge* edge;
	// CStatic

protected:
	void initBound(CRect*);

public:
	Node(wchar_t* aStr=NULL, Node* parentNode=NULL);
	~Node();
	Node* getNextSibling();
	Node* getNextChild(Node* child);
	void addChild(Node* newChild);
	void setParents(Node* parents);
	void draw(IDrawTool* tool);
	virtual void drawSelf(IDrawTool* tool);
	bool isLeftNode();
	void setPos(Pos* aPos);
	void appendChar(UINT);
	void SetData(CString str);
	CRect getBound();
	CString getData();
	Node* getParents();
	vector<Node*> GetChildList();
	Pos* getPos();
	CRect* getTextBound();
	Node* findHitedNode(CPoint);
	bool isHit(CPoint);
};
